<template>
    <div id="inMusic">
        <Nav></Nav>
        <!-- <el-table :data="1" stripe highlight-current-row class="table">
            <el-table-column type="index" :index="indexMethod" width="80">
            </el-table-column>
            <el-table-column prop="title" label="歌曲" width="320">
            </el-table-column>
            <el-table-column prop="artist" label="歌手" width="300">
            </el-table-column>
            <el-table-column label="操作" width="200">
                <template slot-scope="scope">
                    <el-button size="mini" @click="favorites(scope.$index, scope.row)">
                        收藏
                    </el-button>
                    <el-button size="mini" @click="play(scope.$index, scope.row)">
                        播放
                    </el-button>
                </template>
            </el-table-column>
            <el-table-column prop="time" label="时长">
            </el-table-column>
        </el-table> -->
        <player class="player"></player>
        <Footer></Footer>
    </div>
</template>

<script>
import player from "../components/player.vue";
import Nav from "../components/nav.vue";
import Footer from "../components/footer.vue";
export default {
    data() {
        return {
            // music: this.$APlayer.audio
        }
    },
    components: {
        Nav,
        Footer,
        player
    },
    methods: {
        indexMethod(index) {
            return index + 1;
        },
        favorites: function (index, row) {
            console.log(row);
        },
        play(index, row) {
            // this.$audio.splice(index,1)
            // this.$audio.unshift(row)
            // this.$router.push("/music")
        }
    },
    watch:{
        $route(){
            this.$router.go()
        }
    },
    created: function () {
        // console.log(this.music);
    }
}

</script>

<style>
#inMusic {
    background: pink;
    width: 80%;
    margin: 0px auto;
}

#inMusic .table {
    height: 550px;
    width: 90%;
    margin: 10px auto;
}

#inMusic .player {
    margin-top: 20px;
}
</style>